﻿using System;
using System.Web.Mvc;
using System.Web.Routing;
using Microsoft.Practices.ServiceLocation;

namespace Caramel.Web.Mvc
{
	public class ServiceLocatorControllerActivator : IControllerActivator
	{
		public IController Create(RequestContext requestContext, Type controllerType)
		{
			return ServiceLocator.Current.GetInstance(controllerType) as IController;
		}
	}
}
